<!--
  @author chongw
  @since 2021/05/27
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<style>
    body .demo-class .layui-layer-btn .layui-layer-btn0{background:#1AA094;}
</style>
<body>

<!--页面顶层div-->
<div class="layui-fluid">

    <!--面包屑-->
    <blockquote class="layui-crumb">
        系统安全>
        <a th:href="'/brs/scene/list.action'" >监控配置</a>
        &gt;
        <a th:href="|/brs/scene/eventList.action?sceneId=${sceneId}|">事件管理</a>
    </blockquote>

    <!--页面板块
        通常情况下一个页面只有一个板块，
        列表页的一个板块内包含搜索条件、表格、表格工具条、分页导航，
        详情页的一个板块内包含详情列表、表单和按钮栏
        -->
    <div class="layui-card">

        <div class="layui-card-body">

            <div th:replace="event/_tab::tab"/>
            <div class="layui-tab-content">
                <form class="layui-form" action="" lay-filter="zmn-form" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">事件ID：</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="eventId" th:value="${data.eventId}" />
                            <div class="layui-form-mid layui-word-aux" th:text="${data.eventId}"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label layui-form-required">事件名称：</label>
                        <div class="layui-input-block">
                            <input type="text" name="eventName" lay-verify="required"  style="width: 300px;"
                                   autocomplete="off" placeholder="请输入场景名称"
                                   class="layui-input" th:value="${data.eventName}">
                        </div>
                    </div>

                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">事件备注：</label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入内容" class="layui-textarea"  style="width: 300px;"
                                      name="remarks" th:text="${data.remarks}"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item" th:if="${scene.type == 2}">
                        <label class="layui-form-label layui-form-required">快照ID：</label>
                        <div class="layui-input-block">
                            <input type="text" name="cubeSnapshotId" lay-verify="required|integer"  style="width: 300px;"
                                   autocomplete="off" placeholder="请输入快照ID"
                                   class="layui-input" th:value="${objectiveEvent.cubeSnapshotId}">
                        </div>
                    </div>
                    <!-- 判断场景分类是否派单客单价监控 -->
                    <div th:if="${data.eventType == 12}" th:include="event/sales/_extend.html"></div>
                    <!-- -->
                    <div th:if="${data.eventCode == 1881633914}" class="layui-form-item">
                        <label class="layui-form-label layui-form-required">监控触发时间：</label>
                        <div class="layui-input-block">
                            <input type="text" name="triggerTime" id="triggerTime" lay-verify="required"  style="width: 300px;"
                                   autocomplete="off" placeholder="cron" th:value="${data.triggerTime}"
                                   class="layui-input"/>
                        </div>
                        <div class="layui-input-block">
                            <p>例：如需配置每日09:00、14:00触发监控，则配置内容为：0 0 9,14 * * ?<br>

                                如需配置每日09：30、14：30触发监控，则配置内容为： 0 30 9,14 * * ?<br>

                                具体配置规则可参考：https://cron.qqe2.com</p>
                        </div>
                    </div>
                    <br/>
                    <b>其他信息</b>
                    <hr style="background-color:#f6f6f6;">
                    <br/>
                    <div class="layui-form-item">
                        <label class="layui-form-label">修改人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux" th:text="${data.updater+' / '+T(com.zmn.common.utils.date.DateUtil).toString(data.updateTime)}"></div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">创建人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux" th:text="${data.creater+' / '+T(com.zmn.common.utils.date.DateUtil).toString(data.createTime)}"></div>
                        </div>
                    </div>
                    <br/>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="submit" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit-event">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
<!--主js代码置于html外-->
<script type="text/javascript" th:inline="javascript">
    // js参数传值变量统一命名为json
    var json = {
        data: [[${data}]]
    };
    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        event_info: "event/zmn.event.info"
    }).use(['index', 'event_info']);

</script>
</body>
</html>
